package com.sx.service.system;

import com.sx.basic.ResponseEntity;
import com.sx.entity.system.RoleEntity;
import com.sx.mapper.system.RoleMapper;
import com.sx.basic.BasicService;
import com.sx.basic.impl.BasicServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author AdinZ
 * @date 2020/11/7 18:15
 */
@Service
public class RoleService extends BasicServiceImpl<RoleMapper, RoleEntity>
        implements BasicService<RoleEntity> , IRoleService {

    @Override
    public ResponseEntity rolePut(RoleEntity entity) {
        if(entity==null)return toError();
        if(entity.getId()==null)
            super.save(entity);
        else super.update(entity);
        return super.toSuccess();
    }
}
